diff options
Diffstat (limited to 'src/routes/(app)/[username]/(profile)')
3 files changed, 24 insertions, 24 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.server.ts b/src/routes/(app)/[username]/(profile)/+layout.server.ts index 4592b81e..0ed3edb8 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.server.ts +++ b/src/routes/(app)/[username]/(profile)/+layout.server.ts @@ -1,16 +1,16 @@ import { get } from "$lib/utils"; export async function load({ depends, parent }) { - depends("app:user"); + depends("app:user"); - let { subject, user } = await parent(); + const { subject, user } = await parent(); - let { follows, followers } = await get(`/${subject.pubkey}/count`); - let followList = new Promise((r) => r([])); - if (user) - followList = get(`/${user.pubkey}/follows?pubkeysOnly=true`).catch( - () => [], - ); + const { follows, followers } = await get(`/${subject.pubkey}/count`); + let followList = new Promise((r) => r([])); + if (user) + followList = get(`/${user.pubkey}/follows?pubkeysOnly=true`).catch( + () => [], + ); - return { follows, followers, followList }; + return { follows, followers, followList }; } diff --git a/src/routes/(app)/[username]/(profile)/+page.server.ts b/src/routes/(app)/[username]/(profile)/+page.server.ts index e3d3bed1..7d54592b 100644 --- a/src/routes/(app)/[username]/(profile)/+page.server.ts +++ b/src/routes/(app)/[username]/(profile)/+page.server.ts @@ -1,16 +1,16 @@ import { auth, get } from "$lib/utils"; export async function load({ cookies, depends, parent }) { - depends("app:payments"); - depends("app:items"); + depends("app:payments"); + depends("app:items"); - let { subject } = await parent(); + const { subject } = await parent(); - let accounts = []; - if (cookies.get("token")) accounts = await get("/accounts", auth(cookies)); + let accounts = []; + if (cookies.get("token")) accounts = await get("/accounts", auth(cookies)); - let items = await get(`/${subject.id}/items`, auth(cookies)); - items.map((i) => (i.quantity = 0)); + const items = await get(`/${subject.id}/items`, auth(cookies)); + items.map((i) => (i.quantity = 0)); - return { accounts, items }; + return { accounts, items }; } diff --git a/src/routes/(app)/[username]/(profile)/event/[id]/+page.server.ts b/src/routes/(app)/[username]/(profile)/event/[id]/+page.server.ts index baeab3d7..2c0050cf 100644 --- a/src/routes/(app)/[username]/(profile)/event/[id]/+page.server.ts +++ b/src/routes/(app)/[username]/(profile)/event/[id]/+page.server.ts @@ -2,11 +2,11 @@ import { get } from "$lib/utils"; import { error } from "@sveltejs/kit"; export async function load({ params: { id } }) { - try { - let event = await get(`/event/${id}`); - if (!event) error(500, "Event not found"); - return { event }; - } catch (e: any) { - error(500, e.message); - } + try { + const event = await get(`/event/${id}`); + if (!event) error(500, "Event not found"); + return { event }; + } catch (e: any) { + error(500, e.message); + } } |
